TRUNCATE

Syntax: TRUNCATE #channel [\position]     
    or: TRUNCATE
Location: Toolkit II, THOR XVI

Every file has a certain length, measured in bytes, which can be reduced with the command TRUNCATE. 

If TRUNCATE is used without the position parameter, the end of the file will be moved to the current file pointer position, meaning that for most purposes, the last byte of the file is the byte which was being pointed to. 

If you supply a second parameter, then the file pointer is set to the given position before the file is TRUNCATEd.

TRUNCATE without any parameters uses #3 as the default channel and is therefore the same as TRUNCATE#3.

CROSS-REFERENCE:
FLEN and FILE_LEN return the length of a file.
FPOS and FILE_POS return the current file pointer position
FILE_PTRA, GET, PUT, BGET and BPUT all move the file pointer.
